const shouldUseTransition = !/transition=none/.test(location.href)
const switchPage={
    state: {
        direction: shouldUseTransition ? 'forward' : ''
      },
      mutations: {
        UPDATE_DIRECTION (state, direction) {
          state.direction = direction
        },
        updateDirection (state, payload) {
            if (!shouldUseTransition) {
              return
            }
            state.direction = payload.direction
          }
    }
}
export default switchPage;